package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PartyCourseCertificateMapper;
import com.ruoyi.system.domain.PartyCourseCertificate;
import com.ruoyi.system.service.IPartyCourseCertificateService;

/**
 * 党课结业证书Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-10-16
 */
@Service
public class PartyCourseCertificateServiceImpl implements IPartyCourseCertificateService 
{
    @Autowired
    private PartyCourseCertificateMapper partyCourseCertificateMapper;

    /**
     * 查询党课结业证书
     * 
     * @param certificateId 党课结业证书主键
     * @return 党课结业证书
     */
    @Override
    public PartyCourseCertificate selectPartyCourseCertificateByCertificateId(Long certificateId)
    {
        return partyCourseCertificateMapper.selectPartyCourseCertificateByCertificateId(certificateId);
    }

    /**
     * 查询党课结业证书列表
     * 
     * @param partyCourseCertificate 党课结业证书
     * @return 党课结业证书
     */
    @Override
    public List<PartyCourseCertificate> selectPartyCourseCertificateList(PartyCourseCertificate partyCourseCertificate)
    {
        return partyCourseCertificateMapper.selectPartyCourseCertificateList(partyCourseCertificate);
    }

    /**
     * 新增党课结业证书
     * 
     * @param partyCourseCertificate 党课结业证书
     * @return 结果
     */
    @Override
    public int insertPartyCourseCertificate(PartyCourseCertificate partyCourseCertificate)
    {
        partyCourseCertificate.setCreateTime(DateUtils.getNowDate());
        return partyCourseCertificateMapper.insertPartyCourseCertificate(partyCourseCertificate);
    }

    /**
     * 修改党课结业证书
     * 
     * @param partyCourseCertificate 党课结业证书
     * @return 结果
     */
    @Override
    public int updatePartyCourseCertificate(PartyCourseCertificate partyCourseCertificate)
    {
        partyCourseCertificate.setUpdateTime(DateUtils.getNowDate());
        return partyCourseCertificateMapper.updatePartyCourseCertificate(partyCourseCertificate);
    }

    /**
     * 批量删除党课结业证书
     * 
     * @param certificateIds 需要删除的党课结业证书主键
     * @return 结果
     */
    @Override
    public int deletePartyCourseCertificateByCertificateIds(Long[] certificateIds)
    {
        return partyCourseCertificateMapper.deletePartyCourseCertificateByCertificateIds(certificateIds);
    }

    /**
     * 删除党课结业证书信息
     * 
     * @param certificateId 党课结业证书主键
     * @return 结果
     */
    @Override
    public int deletePartyCourseCertificateByCertificateId(Long certificateId)
    {
        return partyCourseCertificateMapper.deletePartyCourseCertificateByCertificateId(certificateId);
    }
}
